<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript">
        function postUrl(url) {
            var parames = new Array();
            parames.push({ name: "param1", value: "param1"});
            parames.push({ name: "param2", value: "param2"});

            Post(url, parames);

            return false;
        }

        function Post(URL, PARAMTERS) {
            //创建form表单
            var temp_form = document.createElement("form");
            temp_form.action = URL;
            //如需打开新窗口，form的target属性要设置为'_blank'
            temp_form.target = "_blank";
            temp_form.method = "post";
            temp_form.style.display = "none";
            //添加参数
            for (var item in PARAMTERS) {
                var opt = document.createElement("textarea");
                opt.name = PARAMTERS[item].name;
                opt.value = PARAMTERS[item].value;
                temp_form.appendChild(opt);
            }
            document.body.appendChild(temp_form);
            //提交数据
            temp_form.submit();
        }
    </script>
</head>
<body>
    <button onclick="postUrl('<%=request.getContextPath()%>/listUploadedFiles')">点击打开文件列表</button>
</body>
</html>